Skip to content

db: add run_labels and run_to_run_labels - #5122

Merged
barnabasdomozi merged 6 commits into
Ericsson:masterfrom
sproderj:run-labels-feature
Oct 26, 2026
Merged

barnabasdomozi merged 6 commits into
Ericsson:masterfrom
sproderj:run-labels-feature

Conversation

@sproderj

@sproderj sproderj commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

Adding run_labels and run_to_run_labels for db and run label related API calls

@sproderj
sproderj requested a review from bruntib as a code owner October 2, 2026 09:30

@barnabasdomozi barnabasdomozi left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently, the linter tests are failing:
https://github.com/Ericsson/codechecker/actions/runs/36990197079/job/110784360627?pr=5122

Also, sorry for changing things around but I think it would make more sense to have two PRs instead:

  • one for database related changes, including Alembic migration
  • one for Thrift API changes, with server side implementation complete

This way, we can merge the changes to master.

So for this PR, only keep changes made to file web/server/codechecker_server/database/run_db_model.py and also implement the Alembic migration (guide here: https://github.com/Ericsson/codechecker/blob/master/docs/web/db_schema_guide.md).
Thanks!

primary_key=True
)

def __init__(self, run_id, run_label_id):

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add type annotations for function parameters.

label_name = Column(String, nullable=False, unique=True, index=True)
description = Column(String, nullable=True)

def __init__(self, label_name, description=None):

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add type annotations for function parameters.

@sproderj
sproderj marked this pull request as draft October 6, 2026 07:54
@sproderj
sproderj marked this pull request as ready for review October 8, 2026 12:59
@barnabasdomozi
barnabasdomozi self-requested a review October 13, 2026 13:40

@barnabasdomozi barnabasdomozi left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As mentioned in my other comments, please add type annotations to the following functions:

  • def __init__(self, label_name, description=None)
  • def __init__(self, run_id, run_label_id)

Apart from that, LGTM

description = Column(String, nullable=True)

def __init__(self, label_name, description=None):
def __init__(self, label_name: String, description: String = None):

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of String, the built-in str type should be used here.

label_name = Column(String, nullable=False, unique=True, index=True)
description = Column(String, nullable=True)

def __init__(self, label_name: str, description: str = None):

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For description, the correct annotation is str | None.

@barnabasdomozi barnabasdomozi left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, great work!

@barnabasdomozi
barnabasdomozi merged commit b87400c into Ericsson:master Oct 26, 2026
10 checks passed
@bruntib bruntib added this to the release 6.30.0 milestone Oct 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants